const fs = require('fs');

// 1. 写文件路径
var path = './data/test.txt';

var content = 'this is write file!';
// 同步的写 如果写入成功，则 content 为 undefined

var content = fs.writeFileSync(path, content, 'utf-8');

console.log(content);



console.log('end....') // 先输出


